﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BackEnd/BackEndMasterPage.Master" AutoEventWireup="true"
    CodeBehind="ManageUsers.aspx.cs" Inherits="AteneoLibri.BackEnd.ManageUsers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Gestione utenti
    </h2>
    <p>
        Numero di utenti registrati
        <asp:Label ID="lblNumberOfUsers" runat="server"></asp:Label>
    </p>
    <asp:Panel ID="pnlLegend" runat="server" Visible="false">
        <div>
            <img src="../Images/ico_green.png" alt="attivo" /> Stato attivo |
            <img src="../Images/ico_yellow.png" alt="stato inatteso" /> Stato inatteso o nullo |
            <img src="../Images/ico_red.png" alt="sospeso" /> Stato sospeso
        </div>
    </asp:Panel>
    <div style="padding-top: 20px;">
        <asp:GridView ID="gvUsers" runat="server" EmptyDataText="Non ci sono utenti registrati"
            AlternatingRowStyle-BackColor="#cccccc" BackColor="#ffffff" CellPadding="3" AutoGenerateColumns="false" OnPageIndexChanging="gvUsers_PageIndexChanging"
            ShowFooter="true" DataKeyNames="IdUser" PageSize="25" AllowPaging="true" EmptyDataRowStyle-ForeColor="Red">
            <PagerStyle CssClass="cssPager" />
            <Columns>
                <asp:BoundField HeaderText="Cognome" ReadOnly="true" DataField="Surname" SortExpression="Surname" />
                <asp:BoundField HeaderText="Nome" ReadOnly="true" DataField="Name" SortExpression="Name" />                
                <asp:BoundField HeaderText="Email" ReadOnly="true" DataField="Email" />
                <asp:BoundField HeaderText="Username" ReadOnly="true" DataField="Username" />
                <%--<asp:BoundField HeaderText="Stato" ReadOnly="true" DataField="IsSuspended" />--%>
                <%--<asp:TemplateField HeaderText="Stato" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <img src='<%# Eval("ImageStatus") %>' alt="stato utente" />                        
                    </ItemTemplate>
                </asp:TemplateField>--%>
                <asp:TemplateField HeaderText="Data" SortExpression="RegistrationData">
                    <ItemTemplate>
                        <asp:Label ID="lblInsertDate" runat="server" Text='<%# Eval("RegistrationData", "{0:d}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <%--<asp:TemplateField>
                    <ItemTemplate>
                        <asp:ImageButton ID="btnSuspend" runat="server" CssClass="metroButton" ImageUrl="~/Images/go.png"
                            OnClick="btnSuspend_Click" CommandArgument='<%# Eval("IdUser") %>' />
                    </ItemTemplate>
                </asp:TemplateField>--%>
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
